package org.scratchcrew.domain;

import java.util.Set;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "t_boards")
@Inheritance(strategy = InheritanceType.JOINED)
@AttributeOverrides(value = { @AttributeOverride(column = @Column(name = "board_id"), name = "id") })
public class Board extends BaseEntity {

	@SuppressWarnings("unused")
	@OneToMany(cascade = CascadeType.REMOVE, mappedBy = "board")
	private Set<ScratchFile> files;

}
